/*
    SA::Render source file
    CCamera structure
*/
#pragma once
#include "CPlaceable.h"
#include "CCam.h"
#include "CQueuedMode.h"
#include "RenderWare.h"
#include "CEntity.h"
#include "CCamPathSplines.h"
#include "CMatrix.h"
#include "CCamera_obj2.h"

#pragma pack(push, 1)
struct CCamera : public CPlaceable
{
    unsigned char bAboveGroundTrainNodesLoaded;
    unsigned char bBelowGroundTrainNodesLoaded;
    unsigned char bCamDirectlyBehind;
    unsigned char bCamDirectlyInFront;
    unsigned char m_bCameraJustRestored;
    unsigned char m_bcutsceneFinished;
    unsigned char m_bCullZoneChecksOn;
    unsigned char m_bFirstPersonBeingUsed;
    unsigned char m_bJustJumpedOutOf1stPersonBecauseOfTarget;
    unsigned char m_bIdleOn;
    unsigned char m_bInATunnelAndABigVehicle;
    unsigned char m_bInitialNodeFound;
    unsigned char m_bInitialNoNodeStaticsSet;
    unsigned char m_bIgnoreFadingStuffForMusic;
    unsigned char m_bPlayerIsInGarage;
    unsigned char m_bPlayerWasOnBike;
    unsigned char m_bJustCameOutOfGarage;
    unsigned char m_bJustInitalised;
    unsigned char m_bJust_Switched;
    unsigned char m_bLookingAtPlayer;
    unsigned char m_bLookingAtVector;
    unsigned char m_bMoveCamToAvoidGeom;
    unsigned char m_bObbeCinematicPedCamOn;
    unsigned char m_bObbeCinematicCarCamOn;
    unsigned char m_bRestoreByJumpCut;
    unsigned char m_bUseNearClipScript;
    unsigned char m_bStartInterScript;
    unsigned char m_bStartingSpline;
    unsigned char m_bTargetJustBeenOnTrain;
    unsigned char m_bTargetJustCameOffTrain;
    unsigned char m_bUseSpecialFovTrain;
    unsigned char m_bUseTransitionBeta;
    unsigned char m_bUseScriptZoomValuePed;
    unsigned char m_bUseScriptZoomValueCar;
    unsigned char m_bWaitForInterpolToFinish;
    unsigned char m_bItsOkToLookJustAtThePlayer;
    unsigned char m_bWantsToSwitchWidescreenOff;
    unsigned char m_WideScreenOn;
    unsigned char m_1rstPersonRunCloseToAWall;
    unsigned char m_bHeadBob;
    unsigned char m_bVehicleSuspenHigh;
    unsigned char m_bEnable1rstPersonCamCntrlsScript;
    unsigned char m_bAllow1rstPersonWeaponsCamera;
    unsigned char m_bCooperativeCamMode;
    unsigned char m_bAllowShootingWith2PlayersInCar;
    unsigned char m_bDisableFirstPersonInCar;
    unsigned short m_ModeForTwoPlayersSeparateCars;
    unsigned short m_ModeForTwoPlayersSameCarShootingAllowed;
    unsigned short m_ModeForTwoPlayersSameCarShootingNotAllowed;
    unsigned short m_ModeForTwoPlayersNotBothInCar;
    unsigned char m_bGarageFixedCamPositionSet;
    unsigned char m_vecDoingSpecialInterPolation;
    unsigned char m_bScriptParametersSetForInterPol;
    unsigned char m_bFading;
    unsigned char m_bMusicFading;
    unsigned char m_bMusicFadedOut;
    unsigned char m_bFailedCullZoneTestPreviously;
    unsigned char m_FadeTargetIsSplashScreen;
    unsigned char WorldViewerBeingUsed;
    unsigned char m_uiTransitionJUSTStarted;
    unsigned char m_uiTransitionState;
    unsigned char ActiveCam;
    char __padding0[2];
    unsigned int m_uiCamShakeStart;
    unsigned int m_uiFirstPersonCamLastInputTime;
    unsigned int m_uiLongestTimeInMill;
    unsigned int m_uiNumberOfTrainCamNodes;
    unsigned int m_uiTimeLastChange;
    unsigned int m_uiTimeWeLeftIdle_StillNoInput;
    unsigned int m_uiTimeWeEnteredIdle;
    unsigned int m_uiTimeTransitionStart;
    unsigned int m_uiTransitionDuration;
    unsigned int m_uiTransitionDurationTargetCoors;
    unsigned int m_BlurBlue;
    unsigned int m_BlurGreen;
    unsigned int m_BlurRed;
    unsigned int m_BlurType;
    unsigned int m_iWorkOutSpeedThisNumFrames;
    unsigned int m_iNumFramesSoFar;
    unsigned int m_iCurrentTrainCamNode;
    unsigned int m_motionBlur;
    unsigned int m_imotionBlurAddAlpha;
    unsigned int m_iCheckCullZoneThisNumFrames;
    unsigned int m_iZoneCullFrameNumWereAt;
    unsigned int WhoIsInControlOfTheCamera;
    unsigned int m_nCarZoom;
    float m_fCarZoomBase;
    float m_fCarZoomTotal;
    float m_fCarZoomSmoothed;
    float m_fCarZoomValueScript;
    unsigned int m_nPedZoom;
    float m_fPedZoomBase;
    float m_fPedZoomTotal;
    unsigned int m_fPedZoomSmoothed;
    float m_fPedZoomValueScript;
    float CamFrontXNorm;
    float CamFrontYNorm;
    float DistanceToWater;
    float HeightOfNearestWater;
    float FOVDuringInter;
    float LODDistMultiplier;
    float GenerationDistMultiplier;
    float m_fAlphaSpeedAtStartInter;
    float m_fAlphaWhenInterPol;
    float m_fAlphaDuringInterPol;
    float m_fBetaDuringInterPol;
    float m_fBetaSpeedAtStartInter;
    float m_fBetaWhenInterPol;
    float m_fFOVWhenInterPol;
    float m_fFOVSpeedAtStartInter;
    float m_fStartingBetaForInterPol;
    float m_fStartingAlphaForInterPol;
    float m_PedOrientForBehindOrInFront;
    float m_CameraAverageSpeed;
    float m_CameraSpeedSoFar;
    float m_fCamShakeForce;
    float m_fFovForTrain;
    float m_fFOV_Wide_Screen;
    float m_fNearClipScript;
    float m_fOldBetaDiff;
    float m_fPositionAlongSpline;
    float m_ScreenReductionPercentage;
    float m_ScreenReductionSpeed;
    float m_AlphaForPlayerAnim1rstPerson;
    float Orientation;
    float PlayerExhaustion;
    float SoundDistUp;
    float SoundDistUpAsRead;
    float SoundDistUpAsReadOld;
    float m_fAvoidTheGeometryProbsTimer;
    unsigned short m_nAvoidTheGeometryProbsDirn;
    unsigned short __padding1;
    float m_fWideScreenReductionAmount;
    float m_fStartingFOVForInterPol;
    CCam Cams[3];
    void *pToGarageWeAreIn;
    void *pToGarageWeAreInForHackAvoidFirstPerson;
    CQueuedMode m_PlayerMode;
    CQueuedMode PlayerWeaponMode;
    RwV3D m_PreviousCameraPosition;
    RwV3D m_RealPreviousCameraPosition;
    RwV3D m_cvecAimingTargetCoors;
    RwV3D m_vecFixedModeVector;
    RwV3D m_vecFixedModeSource;
    RwV3D m_vecFixedModeUpOffSet;
    RwV3D m_vecCutSceneOffset;
    RwV3D m_cvecStartingSourceForInterPol;
    RwV3D m_cvecStartingTargetForInterPol;
    RwV3D m_cvecStartingUpForInterPol;
    RwV3D m_cvecSourceSpeedAtStartInter;
    RwV3D m_cvecTargetSpeedAtStartInter;
    RwV3D m_cvecUpSpeedAtStartInter;
    RwV3D m_vecSourceWhenInterPol;
    RwV3D m_vecTargetWhenInterPol;
    RwV3D m_vecUpWhenInterPol;
    RwV3D m_vecClearGeometryVec;
    RwV3D m_vecGameCamPos;
    RwV3D SourceDuringInter;
    RwV3D TargetDuringInter;
    RwV3D UpDuringInter;
    RwV3D m_vecAttachedCamOffset;
    RwV3D m_vecAttachedCamLookAt;
    float m_fAttachedCamAngle;
    RwCamera *m_pRwCamera;
    CEntity *pTargetEntity;
    CEntity *pAttachedEntity;
    CCamPathSplines m_arrPathArray[4];
    unsigned char m_bMirrorActive;
    unsigned char m_bResetOldMatrix;
    char __padding2[2];
    CMatrix m_cameraMatrix;
    CMatrix m_cameraMatrixOld;
    CMatrix m_viewMatrix;
    CMatrix m_matInverse;
    CMatrix m_matMirrorInverse;
    CMatrix m_matMirror;
    RwV3D m_vecFrustumNormals[4];
    RwV3D field_B54[4];
    RwV3D field_B84[4];
    float field_BB4[4];
    float field_BC4[4];
    RwV3D field_BD4;
    unsigned int field_BE0;
    unsigned int field_BE4;
    unsigned int field_BE8;
    unsigned int field_BEC;
    unsigned int field_BF0;
    unsigned int field_BF4;
    unsigned int field_BF8;
    unsigned int _fadeAlpha;
    unsigned int field_C00;
    unsigned int _fFadeDuration;
    unsigned int field_C08;
    unsigned int field_C0C;
    unsigned int field_C10;
    unsigned int field_C14;
    unsigned int field_C18;
    unsigned int field_C1C;
    unsigned int field_C20;
    unsigned int field_C24;
    unsigned int field_C28;
    unsigned int field_C2C;
    unsigned short _fadeInOutFlag;
    unsigned short field_C32;
    unsigned int field_C34;
    unsigned short field_C38;
    unsigned short field_C3A;
    unsigned short field_C3C;
    unsigned short field_C3E;
    unsigned int _fadeStartTime;
    unsigned int field_C44;
    unsigned int field_C48;
    unsigned int field_C4C;
    unsigned int field_C50;
    unsigned int field_C54;
    unsigned int field_C58;
    unsigned int transverseStartTime;
    unsigned int transverseEndTime;
    RwV3D transverseEndPoint;
    RwV3D transverseStartPoint;
    unsigned char transverseMode;
    unsigned char field_C7D;
    unsigned char field_C7E;
    unsigned char field_C7F;
    RwV3D field_C80;
    unsigned char field_C8C;
    unsigned char field_C8D;
    unsigned char field_C8E;
    unsigned char field_C8F;
    unsigned int field_C90;
    unsigned int _startJiggleTime;
    unsigned int _endJiggleTime;
    unsigned int field_C9C;
    unsigned int field_CA0;
    unsigned int _startZoomTime;
    unsigned int _endZoomTime;
    unsigned int _zoomInFactor;
    unsigned int _zoomOutFactor;
    unsigned char _zoomMode;
    unsigned char field_CB5;
    unsigned char field_CB6;
    unsigned char field_CB7;
    unsigned int field_CB8;
    unsigned int field_CBC;
    unsigned int field_CC0;
    RwV3D field_CC4;
    RwV3D field_CD0;
    unsigned char field_CDC;
    unsigned char field_CDD;
    unsigned char field_CDE;
    unsigned char field_CDF;
    RwV3D field_CE0;
    unsigned char field_CEC;
    unsigned char field_CED;
    unsigned char field_CEE;
    unsigned char field_CEF;
    unsigned char field_CF0;
    unsigned char field_CF1;
    unsigned char field_CF2;
    unsigned char field_CF3;
    CCamera_obj2 field_CF4[5];
    unsigned int field_D44;
    unsigned int field_D48;
    unsigned int field_D4C;
    unsigned int field_D50;
    unsigned int field_D54;
    unsigned int field_D58;
    unsigned int field_D5C;
    unsigned int field_D60;
    unsigned int field_D64;
    unsigned int field_D68;
    unsigned int field_D6C;
    unsigned int field_D70;
    unsigned int field_D74;
};
#pragma pack(pop)